home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Frameworks / TransSkel 3.24 / Demos / C Demos / MiniSkel / MiniSkel.c next >
Text File  |  1995-03-21  |  1KB  |  52 lines

  1. /*
  2.  * TransSkel demonstration:  Minimal application
  3.  *
  4.  * This program does nothing but put up an Apple menu with desk
  5.  * accessories, and a File menu with a Quit item.  The user can
  6.  * run DA's until Quit is selected or command-Q is typed.
  7.  *
  8.  * The project should include this file, TransSkel.c (or a project
  9.  * built from TransSkel.c), and MacTraps.
  10.  *
  11.  * 21 Apr 88    Paul DuBois
  12.  * 29 Jan 89 Version 1.01
  13.  * - Conversion for TransSkel 2.0.  Integer should be a typedef
  14.  * for compiler 2-byte integer type.
  15.  * 12 Jan 91 Version 1.02
  16.  * - Conversion for TransSkel 3.00.
  17.  * 05 Jun 93 Version 1.03
  18.  * - Conversion for THINK C 6.0.
  19.  * 21 Feb 94
  20.  * - Updated for TransSkel 3.11.
  21.  * 21 Mar 95
  22.  * - Updated for TransSkel 3.19.
  23.  */
  24.  
  25. # include    "TransSkel.h"
  26.  
  27.  
  28. # define    fileMenuID     (skelAppleMenuID + 1)
  29.  
  30.  
  31. static pascal void
  32. DoFileMenu (short item)
  33. {
  34.     SkelStopEventLoop ();            /* tell SkelEventLoop to quit */
  35. }
  36.  
  37.  
  38. int
  39. main (void)
  40. {
  41. MenuHandle    m;
  42.  
  43.     SkelInit ((SkelInitParamsPtr) nil);    /* initialize TransSkel */
  44.     SkelApple (nil, nil);                /* initialize Apple menu */
  45.     m = NewMenu (fileMenuID, "\pFile");    /* create File menu */
  46.     AppendMenu (m, "\pQuit/Q");
  47.     /* install File menu handler */
  48.     (void) SkelMenu (m, DoFileMenu, nil, false, true);
  49.     SkelEventLoop ();                    /* loop 'til Quit selected */
  50.     SkelCleanup ();                        /* clean up */
  51. }
  52.